﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MessageModule
{
    public static class MessageMagager
    {
        public static void ShowAutoHideMessage(string strMessage)
        {
            Action action = () =>
            {
                FormAutoHideMessage formAutoHideMessage = new FormAutoHideMessage(strMessage);
                formAutoHideMessage.TopLevel=false;
                FrameManager.FrameManager.flyoutPanelStack.Controls.Add(formAutoHideMessage);
                formAutoHideMessage.Show();
                FrameManager.FrameManager.flyoutPanel.ShowPopup(true);
            };
            FrameManager.FrameManager.FrmMain.Invoke(action);
        }
        public static void ShowDailogForm(string strMessage)
        {
            Action action = () =>
            {
                FormNeedRespone formNeedRespone = new FormNeedRespone(strMessage);
                formNeedRespone.ShowDialog(FrameManager.FrameManager.FrmMain); 
               
            };
            FrameManager.FrameManager.FrmMain.Invoke(action);
        }
    }
}
